class PayAndBal {
  int id;
  String consumptionObject;
  String classification;
  int card;
  double total;
  double consumptionNum;
  bool isPay;
  String imageStr;
  String updateTime;
  PayAndBal(
      this.id,
      this.consumptionObject,
      this.classification,
      this.card,
      this.total,
      this.consumptionNum,
      this.isPay,
      this.imageStr,
      this.updateTime,
      );

  fromMap(Map map) {
    consumptionObject = map[consumptionObject];
    classification = map[classification];
    card = map[card];
    total = map[total];
    consumptionNum = map[consumptionNum];
    isPay = map[isPay];
    imageStr = map[imageStr];
    updateTime = map[updateTime];
  }


  @override
  String toString() {
    return 'PayAndBal{'
        'consumptionObject: $consumptionObject, '
        'classification: $classification, '
        'card: $card '
        'total: $total '
        'consumptionNum: $consumptionNum '
        'isPay: $isPay '
        'imageStr: $imageStr '
        'updateTime: $updateTime }'
    ;
  }

  Map<String, dynamic> toMap() {
    return{
      'consumptionObject':consumptionObject,
      'classification':classification,
      'card':card,
      'total':total,
      'consumptionNum':consumptionNum,
      'isPay':isPay,
      'imageStr':imageStr,
      'updateTime':updateTime,
    };
  }
}